﻿/// <reference path="../jquery.min.js" />
/// <reference path="../module/rsseasy.v2.js" />
/// <reference path="../module/rssapi.v2.js" />

$(function () {
    var integraltocashpage = $("#integraltocashpage");
    integraltocashpage.find("[useintegral]").html(RssUser.Data.integral);

    integraltocashpage.load(function () {

        RssApi.Table.List("integral_cash").setLoading().condition({ "state": 1, "integral": "{gt~0}" }).getJson(function (data) {
            $("#integraltocashwrap").mapview(data).find("[mapattr][rssid]").click(function () {

                //兑换优惠券
                new Ajax("integral/convert/cash").keyvalue("id", $(this).attr("rssid")).keymyid().getJson(function (data) {
                });
            });
        });
    });
});